export function pair<T>(
  arr: T[],
  cb: ([cur, next]: [T, T], index: number) => void,
) {
  for (let i = 0; i < arr.length - 1; i++) {
    cb([arr[i], arr[i + 1]], i);
  }
}
